package org.sfs.storemypassword.view.domain.register;

import java.security.NoSuchAlgorithmException;

import org.romaframework.module.users.domain.BaseAccount;
import org.romaframework.module.users.view.domain.baseaccount.BaseAccountInstance;

public class BaseAccountWrapper extends BaseAccountInstance {

	public BaseAccountWrapper(BaseAccount baseAccount) {
		setEntity(baseAccount);
	}

	public String getEmail() {
		return entity.getEmail();
	}

	public void setEmail(String email) {
		entity.setEmail(email);
	}

	public void onEmailChange() {
		if (getEmail() != null && !getEmail().trim().isEmpty()) {

		}
	}

	public String getPassword() {
		return entity.getPassword();
	}

	public void setPassword(String password) {
		entity.setPassword(password);
	}

	public void onPasswordChange() {
		if (getPassword() != null && !getPassword().trim().isEmpty()) {

		}
	}

	public String getConfirmPassword() {
		return super.getConfirmPassword();
	}

	public void setConfirmPassword(String password) {
		try {
			super.setConfirmPassword(password);
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
	}

	public void onConfirmPasswordChange() {
		if (getConfirmPassword() != null && !getConfirmPassword().trim().isEmpty()) {

		}
	}

}
